<div class="left_nav">
    <ul id="accordion" class="accordion">
        <li>
            <div class="link @if( Route::currentRouteName() == 'home') active @endif"><i
                        class="iconfont icon-zhuyaoxinxi color"></i><a href="{{ route('home') }}">主页</a></div>
        </li>
        <li>
            <div class="link @if(in_array(Route::currentRouteName(), ['employee', 'customer', 'users.index', 'permissions.index', 'permissions.create', 'permissions.edit', 'users.permission'])) active @endif">
                <i class="iconfont icon-xinxiguanli color"></i>信息管理<i
                        class="iconfont  arrow @if(in_array(Route::currentRouteName(), ['employee', 'customer', 'users.index', 'permissions.index', 'permissions.create', 'permissions.edit', 'users.permission'])) icon-arrow-bottom @else icon-fanhui-copy   @endif  "></i>
            </div>
            <ul class="submenu"
                style="display: @if(in_array(Route::currentRouteName(), ['employee', 'customer', 'users.index', 'permissions.index', 'permissions.create', 'permissions.edit', 'users.permission'])) {{ 'block' }} @else {{ 'none' }} @endif">

                @if(Auth::user()->id == 1 || Auth::user()->can('employee.index'))
                    <li>
                        <a href=" {{ route('employee')  }} "
                           class="@if( Route::currentRouteName() == 'employee') {{ 'active2' }} @endif">员工信息</a>
                    </li>
                @endif

                @if(Auth::user()->id == 1 || Auth::user()->can('customer.index'))
                        <li><a href="{{ route('customer')  }}"
                               class="@if( Route::currentRouteName() == 'customer') {{ 'active2' }} @endif">客户信息</a>
                        </li>
                @endif

                @if(Auth::user()->id == 1 || Auth::user()->can('users.index'))
                        <li><a href="{{ route('users.index')  }}"
                               class="@if(in_array(Route::currentRouteName(), ['users.index', 'users.permission'])) {{ 'active2' }} @endif">员工账号</a>
                        </li>
                @endif

                {{--<li><a href="#">业务基本信息</a></li>--}}


                @if(Auth::user()->id == 1 || Auth::user()->can('permissions.index'))
                    <li>
                        <a href="{{ route('permissions.index')  }}"
                           class="@if(in_array(Route::currentRouteName(), ['permissions.index', 'permissions.create', 'permissions.edit'])) {{ 'active2' }} @endif">权限设置</a>
                    </li>
                @endif

            </ul>
        </li>

        @if(Auth::user()->id == 1 || Auth::user()->can('loans.index'))
            <li>
                <div class="link @if( Route::currentRouteName() == 'loans.index') active @endif">
                    <i class="iconfont icon-weibiaoti5 color"></i>
                    <a href="{{ route('loans.index') }}">贷款申请</a>
                </div>
            </li>
        @endif

        @if(Auth::user()->id == 1 || Auth::user()->can('examine.index'))
            <li>
                <div class="link @if( Route::currentRouteName() == 'examine.index') active @endif">
                    <i class="iconfont icon-shenhexiangmu color"></i>
                    <a href="{{ route('examine.index') }}">需要审核业务</a>
                </div>
            </li>
        @endif
        @if(Auth::user()->id == 1 || Auth::user()->can('finance.index'))
            <li>
                <div class="link @if( Route::currentRouteName() == 'finance.index') active @endif">
                    <i class="iconfont icon-caiwu color"></i>
                    <a href="{{ route('finance.index') }}">财务</a>
                </div>
            </li>
        @endif



        {{--{{ csrf_field() }}--}}
        {{--{{  method_field('DELETE') }}--}}
    </ul>
</div>